-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
43 lines (35 loc) · 775 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
int main() {
int A, B, C, temp;
scanf("%d %d %d", &A, &B, &C);
if (A < B){
temp = A;
A = B;
B = temp;
}
if (B < C){
temp = B;
B = C;
C = temp;
}
if (A < B){
temp = A;
A = B;
B = temp;
}
if(A + B > C && A + C > B && B + C > A){
if(A == B && B == C)
printf("Valido-Equilatero\n");
else if(A == B || B == C)
printf("Valido-Isoceles\n");
else if(A != B && B != C && C != A)
printf("Valido-Escaleno\n");
if(A * A == B * B + C * C)
printf("Retangulo: S\n");
else
printf("Retangulo: N\n");
}
else
printf("Invalido\n");
return 0;
}